#=================================================================
#add by luli:20231017
#用于全局记录三方库的片
#=================================================================
#=================================================================
#此文件用于定义全局的三方库的版本信息
IF(NOT EWX_USE_CONAN_ENV)
   set(SWDEV_GDAL_PACKAGE          "gdal-3.3.2"        CACHE STRING "" FORCE)
   set(SWDEV_GEOS_PACKAGE          "geos-3.5.1"        CACHE STRING "" FORCE)
   set(SWDEV_QT_PACKAGE            "qt-5.12.9"        CACHE STRING "" FORCE)
   set(SWDEV_OSG_EARTH_PACKAGE     "osgEarth-2.10.1"   CACHE STRING "" FORCE)
   set(SWDEV_OSG_PACKAGE           "osg-3.6.3"         CACHE STRING "" FORCE)
   set(SWDEV_TIFF_PACKAGE          "tiff-4.3.0"        CACHE STRING "" FORCE)
   set(SWDEV_SDL_PACKAGE           "sdl-2.0.16"        CACHE STRING "" FORCE)
   set(SWDEV_PROJ_PACKAGE          "proj-8.1.1"        CACHE STRING "" FORCE)
   set(SWDEV_GTEST_PACKAGE         "gtest-1.8.0"       CACHE STRING "" FORCE)
   set(SWDEV_LICENSE_PACKAGE       "license-2.1.0"     CACHE STRING "" FORCE)
ELSE()
   set(SWDEV_GDAL_PACKAGE          "gdal-3.0.4"        CACHE STRING "" FORCE)
   set(SWDEV_GEOS_PACKAGE          "geos-3.5.1"        CACHE STRING "" FORCE)
   set(SWDEV_QT_PACKAGE            "qt-5.12.9"        CACHE STRING "" FORCE)
   set(SWDEV_OSG_EARTH_PACKAGE     "osgEarth-2.10.1"   CACHE STRING "" FORCE)
   set(SWDEV_OSG_PACKAGE           "osg-3.6.3"         CACHE STRING "" FORCE)
   set(SWDEV_TIFF_PACKAGE          "tiff-4.1.0"        CACHE STRING "" FORCE)
   set(SWDEV_SDL_PACKAGE           "sdl-2.0.7"        CACHE STRING "" FORCE)
   set(SWDEV_PROJ_PACKAGE          "proj-7.0.0"        CACHE STRING "" FORCE)
   set(SWDEV_GTEST_PACKAGE         "gtest-1.12.1"       CACHE STRING "" FORCE)
   set(SWDEV_LICENSE_PACKAGE       "license-2.1.0"     CACHE STRING "" FORCE)
   set(SWDEV_SQLITE_PACKAGE         "sqlite3-3.32.3"     CACHE STRING "" FORCE)
   set(SWDEV_TINYXML2_PACKAGE       "tinyxml2-7.1"     CACHE STRING "" FORCE)
ENDIF()
#=================================================================
#=================================================================
#=================================================================
#TEST_FIND_PKG
#此函数为测试函数，用于测试三方库环境的正确性
macro(TEST_FIND_EWX_3RD_PKGS)
   #包括模块，否则后面一些宏无法执行
   set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/tools/3rd_party-cmake ${CMAKE_MODULE_PATH})
   include(config)

   # Configure the 3rd_party libraries
   swdev_acquire_packages_conan_adaptered(
      ${CMAKE_CURRENT_SOURCE_DIR} "gtest-1.8.0")
    
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "gdal-3.0.4")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "geos-3.5.1")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "gtest-1.8.0")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "license-2.1.0")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "osg-3.6.3")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "osgEarth-2.10.1")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "qt-5.12.9")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "pdisplay-1.0.0")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "proj-7.0.0")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "sdl-2.0.7")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "sqlite-3.32.3")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "tiff-4.1.0")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "tinyxml2-7.1")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "vrqt-1.0.2")

    # #OK
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} "VRUtil-1.0.0")


    # if (WIN32)
    #     swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} ${EWXDEV_TIFF_PACKAGE})
    # endif()

    # #if(EWX_INSTALL_WITH_LICENSE)
    # set(EWXDEV_LICENSE_PACKAGE      "license-2.1.0"     )
    # swdev_acquire_packages_conan_adaptered(${CMAKE_CURRENT_SOURCE_DIR} ${EWXDEV_LICENSE_PACKAGE})
    #ENDIF() 
endmacro()